def solve(nums):
    n = len(nums)
    count_dict = {}
    for i in range(n):
        if nums[i] not in count_dict:
            count_dict[nums[i]] = 1
        else:
            count_dict[nums[i]] += 1
        if count_dict[nums[i]] > n // 2:
            return nums[i]

    return None


if __name__ == "__main__":
    nums = [3, 2, 3]
    print(solve(nums))
